<!DOCTYPE html>
<html lang="en">
<head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
    <meta charset="UTF-8">
    <title>Document</title>
    <link rel="stylesheet" type="text/css" href="/public/static/h-ui/css/H-ui.min.css?v=1.0" />
    <link rel="stylesheet" type="text/css" href="/public/static/h-ui.admin/css/style.css?v=1.3" />
    <link media="all" href="/public/menu/css/article.css" type="text/css" rel="stylesheet">
</head>
<body style="background-color: rgb(255, 255, 255);">
<div class="cl">
    <form class="Huiform" method="post" action="__CONF_SITE__admin/goods/select_lib_goods" style=" padding-top: 15px;">
        <div class="text-c">
            类别：
           <span class="select-box" style="width: auto">
              <select class="select" name="ser_area">
                    <option {if condition="$area==-1"} selected {/if} value="-1">全部</option>
                  {volist name="cate" id="cc"}
                     <option {if condition="$area==$cc.cate_id"} selected {/if} value="{$cc.cate_id}">{$cc.cate_name}</option>
                  {/volist}
              </select>
            </span>
            <input type="submit" class="btn selecta" style="height: 30px !important; line-height: 30px !important;" value="搜索">
        </div>
    </form>
</div>
<div class="jbox-container" style="float: left; padding: 0px;">
    <ul class="gagp-goodslist" style="padding: 10px; width: 777px;">
        <!-- 栏目分类 -->
        <table class="wxtables">
            <colgroup>
                <col width="10%"><col width="15%"><col width="20%"><col width="25%"><col width="15%">
            </colgroup>
            <thead>
            <tr style="background-color: rgb(13, 163, 249);">
                <td>ID</td>
                <td>图片</td>
                <td>名称</td>
                <td>发布时间</td>
                <td>操作</td>
            </tr>
            </thead>
            <tbody>
            {volist name="goods" id="vo"}
                <tr>
                    <td><p>{$vo['goods_id']}</p></td>
                    <td><p><img src="/{$vo['img_cover_small']}" alt="" height="50px" width="50px"></p></td>
                    <td><p>{$vo['goods_name']}</p></td>
                    <td><p>{$vo['create_time']|date='Y-m-d H:i:s',###}</p></td>
                    <td>
                        <a data-goods-id="{$vo['goods_id']}" class="btn selecta">选择</a>
                    </td>
                </tr>
            {/volist}
            </tbody>
        </table>
    </ul>
</div>
<div class="n_page_no">
    {$page}
</div>
<div style="color: #fff;height:120px; line-height: 120px;clear: both;">壹佰小程序</div>
<div class="sel_fun_opt" style="position: fixed; bottom: 0px;width:100%; height: 50px;padding-top:20px;background: #fff;border-top:1px solid #eeeeee;">
    <div class="sure" onclick="">确定</div>
    <div class="cancel" onclick="">返回</div>
</div>
<script src="/public/menu/js/jquery-2.1.1.js" type="text/javascript"></script>
<script type="text/javascript" src="/public/lib/layer/2.4/layer.js"></script>
<script type="text/javascript">
    $(".selecta").click(function(){
        if ($(this).hasClass('selectedb')) {
        }else{
            $(this).addClass('selectedb');
            $(this).html('已选择');
            $(this).parent().parent().siblings().find('.selecta').removeClass('selectedb');
            $(this).parent().parent().siblings().find('.selecta').html('选择');
        }
    });
    $(".sure").click(function(){
        if (typeof($('.selectedb').attr('data-goods-id'))=="undefined"){
                layer.msg('请选择内容',{icon:5,time:1000});
                return false;
        }
        var goods_id=$('.selectedb').attr('data-goods-id');
        parent.get_lib_goods(goods_id);
       var index = parent.layer.getFrameIndex(window.name);
        parent.layer.close(index);
    })
    $(".cancel").click(function(){
        var index = parent.layer.getFrameIndex(window.name);
        parent.layer.close(index);
    });
</script>
</body>
</html>
